/**
 * (c)Copyright 2007 SinoCredit Co,Ltd. All Rights Reserved.  
 * RegExpUtils.java, 2:45:20 PM 
 * @author yipeng
 * @since Nov 6, 2007
 * @version 1.0
 */
package com.sys.web.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class RegExpUtils {
	
	Log log = LogFactory.getLog(this.getClass());

	/**
	 * 通过keyStr查找map中对应的对象
	 * @param map 对象map
	 * @param keyStr 霄1�7要查找的key
	 * @return
	 */
	public Object getMapValue(Map<String, ?> map, String keyStr) {
		if(null==map)
			return null;
		for ( String key : map.keySet() ) {
			log.debug("regexp:\t" + key);
			if ( keyStr.matches(key) )
				return map.get(key);
		}
		return null;
	}
	
}
